import { createRouter, createWebHistory } from 'vue-router'
import Platground from '@/views/Playground'
const Layout = () => import('@/views/Layout')
const Home = () => import('@/views/Home/index')
const Login = () => import('@/views/login')

const routes = [
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    children: [
      {
        path: '',
        component: Home
      }
    ]
  },
  {
    path: '/play',
    component: Platground
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
